package cn.zust.edu.cn;

public class Circle implements IShape{

    private Point ptCenter;
    private int radius;

    public Circle(Point center,int r) {
        this.ptCenter = center;
        this.radius = r;
    }

    @Override
    public double perimeter() {
        return 2 * Math.PI * radius;
    }

    @Override
    public double area() {
        return Math.PI * radius * radius;
    }

    @Override
    public void draw() {
        System.out.println("圆心点为："+this.ptCenter.getX() + "," + this.ptCenter.getY());
        System.out.println("圆半径为："+this.radius);
    }
}
